/****************************************************************
*
* The author of this software is David M. Gay.
*
* Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*
***************************************************************/
/* Please send bug reports to David M. Gay (dmg at acm dot org,
* with " at " changed at "@" and " dot " changed to "."). */
/* On a machine with IEEE extended-precision registers, it is
* necessary to specify double-precision (53-bit) rounding precision
* before invoking strtod or dtoa. If the machine uses (the equivalent
* of) Intel 80x87 arithmetic, the call
* _control87(PC_53, MCW_PC);
* does this with many compilers. Whether this or another call is
* appropriate depends on the compiler; for this to work, it may be
* necessary to #include "float.h" or another system-dependent header
* file.
*/
/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
*
* This strtod returns a nearest machine number to the input decimal
* string (or sets errno to ERANGE). With IEEE arithmetic, ties are
* broken by the IEEE round-even rule. Otherwise ties are broken by
* biased rounding (add half and chop).
*
* Inspired loosely by William D. Clinger's paper "How to Read Floating
* Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
*
* Modifications:
*
* 1. We only require IEEE, IBM, or VAX double-precision
* arithmetic (not IEEE double-extended).
* 2. We get by with floating-point arithmetic in a case that
* Clinger missed -- when we're computing d * 10^n
* for a small integer d and the integer n is not too
* much larger than 22 (the maximum integer k for which
* we can represent 10^k exactly), we may be able to
* compute (d*10^k) * 10^(e-k) with just one roundoff.
* 3. Rather than a bit-at-a-time adjustment of the binary
* result in the hard case, we use floating-point
* arithmetic to determine the adjustment to within
* one bit; only in really hard cases do we need to
* compute a second residual.
* 4. Because of 3., we don't need a large table of powers of 10
* for ten-to-e (just some small tables, e.g. of 10^k
* for 0 <= k <= 22).
*/
/*
* #define IEEE_8087 for IEEE-arithmetic machines where the least
* significant byte has the lowest address.
* #define IEEE_MC68k for IEEE-arithmetic machines where the most
* significant byte has the lowest address.
* #define Long int on machines with 32-bit ints and 64-bit longs.
* #define IBM for IBM mainframe-style floating-point arithmetic.
* #define VAX for VAX-style floating-point arithmetic (D_floating).
* #define No_leftright to omit left-right logic in fast floating-point
* computation of dtoa.
* #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
* and strtod and dtoa should round accordingly.
* #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
* and Honor_FLT_ROUNDS is not #defined.
* #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
* that use extended-precision instructions to compute rounded
* products and quotients) with IBM.
* #define ROUND_BIASED for IEEE-format with biased rounding.
* #define Inaccurate_Divide for IEEE-format with correctly rounded
* products but inaccurate quotients, e.g., for Intel i860.
* #define NO_LONG_LONG on machines that do not have a "long long"
* integer type (of >= 64 bits). On such machines, you can
* #define Just_16 to store 16 bits per 32-bit Long when doing
* high-precision integer arithmetic. Whether this speeds things
* up or slows things down depends on the machine and the number
* being converted. If long long is available and the name is
* something other than "long long", #define Llong to be the name,
* and if "unsigned Llong" does not work as an unsigned version of
* Llong, #define #ULLong to be the corresponding unsigned type.
* #define KR_headers for old-style C function headers.
* #define Bad_float_h if your system lacks a float.h or if it does not
* define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
* FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
* #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
* if memory is available and otherwise does something you deem
* appropriate. If MALLOC is undefined, malloc will be invoked
* directly -- and assumed always to succeed.
* #define Omit_Private_Memory to omit logic (added Jan. 1998) for making
* memory allocations from a private pool of memory when possible.
* When used, the private pool is PRIVATE_MEM bytes long: 2304 bytes,
* unless #defined to be a different length. This default length
* suffices to get rid of MALLOC calls except for unusual cases,
* such as decimal-to-binary conversion of a very long string of
* digits. The longest string dtoa can return is about 751 bytes
* long. For conversions by strtod of strings of 800 digits and
* all dtoa conversions in single-threaded executions with 8-byte
* pointers, PRIVATE_MEM >= 7400 appears to suffice; with 4-byte
* pointers, PRIVATE_MEM >= 7112 appears adequate.
* #define INFNAN_CHECK on IEEE systems to cause strtod to check for
* Infinity and NaN (case insensitively). On some systems (e.g.,
* some HP systems), it may be necessary to #define NAN_WORD0
* appropriately -- to the most significant word of a quiet NaN.
* (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.)
* When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined,
* strtod also accepts (case insensitively) strings of the form
* NaN(x), where x is a string of hexadecimal digits and spaces;
* if there is only one string of hexadecimal digits, it is taken
* for the 52 fraction bits of the resulting NaN; if there are two
* or more strings of hex digits, the first is for the high 20 bits,
* the second and subsequent for the low 32 bits, with intervening
* white space ignored; but if this results in none of the 52
* fraction bits being on (an IEEE Infinity symbol), then NAN_WORD0
* and NAN_WORD1 are used instead.
* #define MULTIPLE_THREADS if the system offers preemptively scheduled
* multiple threads. In this case, you must provide (or suitably
* #define) two locks, acquired by ACQUIRE_DTOA_LOCK(n) and freed
* by FREE_DTOA_LOCK(n) for n = 0 or 1. (The second lock, accessed
* in pow5mult, ensures lazy evaluation of only one copy of high
* powers of 5; omitting this lock would introduce a small
* probability of wasting memory, but would otherwise be harmless.)
* You must also invoke freedtoa(s) to free the value s returned by
* dtoa. You may do so whether or not MULTIPLE_THREADS is #defined.
* #define NO_IEEE_Scale to disable new (Feb. 1997) logic in strtod that
* avoids underflows on inputs whose result does not underflow.
* If you #define NO_IEEE_Scale on a machine that uses IEEE-format
* floating-point numbers and flushes underflows to zero rather
* than implementing gradual underflow, then you must also #define
* Sudden_Underflow.
* #define YES_ALIAS to permit aliasing certain double values with
* arrays of ULongs. This leads to slightly better code with
* some compilers and was always used prior to 19990916, but it
* is not strictly legal and can cause trouble with aggressively
* opt
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 3rd edition, and runs on Windows XP and Vista, Mac OS X 10.5 (Leopard), and Linux systems that use IA-32 or ARM processors. V8 can run standalone, or can be embedded into any C++ application.
资源推荐
资源详情
资源评论
收起资源包目录
V8 Javascript引擎最新源代码 (807个子文件)
annotate 149B
AUTHORS 654B
windows-tick-processor.bat 260B
dtoa.c 71KB
dtoa-config.c 4KB
codegen-ia32.cc 269KB
objects.cc 252KB
runtime.cc 250KB
codegen-x64.cc 231KB
test-api.cc 225KB
codegen-arm.cc 185KB
test-debug.cc 180KB
jsregexp.cc 158KB
unicode.cc 151KB
parser.cc 150KB
heap.cc 114KB
api.cc 112KB
spaces.cc 85KB
debug.cc 83KB
mark-compact.cc 65KB
bootstrapper.cc 61KB
platform-win32.cc 57KB
simulator-arm.cc 50KB
assembler-ia32.cc 50KB
test-regexp.cc 49KB
serialize.cc 49KB
assembler-x64.cc 46KB
regexp-macro-assembler-ia32.cc 46KB
assembler-arm.cc 45KB
ic.cc 44KB
stub-cache-ia32.cc 42KB
stub-cache-arm.cc 38KB
virtual-frame-ia32.cc 36KB
stub-cache.cc 36KB
macro-assembler-ia32.cc 35KB
virtual-frame-x64.cc 35KB
macro-assembler-arm.cc 34KB
disasm-ia32.cc 34KB
log.cc 34KB
scopes.cc 33KB
ic-ia32.cc 32KB
factory.cc 32KB
top.cc 32KB
objects-debug.cc 31KB
prettyprinter.cc 28KB
handles.cc 27KB
macro-assembler-x64.cc 27KB
builtins-ia32.cc 26KB
ic-arm.cc 26KB
scanner.cc 25KB
test-heap.cc 24KB
builtins.cc 24KB
disasm-arm.cc 24KB
frames.cc 23KB
d8.cc 23KB
builtins-x64.cc 23KB
conversions.cc 22KB
builtins-arm.cc 22KB
d8-posix.cc 22KB
rewriter.cc 22KB
test-log.cc 21KB
process.cc 21KB
execution.cc 21KB
scopeinfo.cc 20KB
interpreter-irregexp.cc 20KB
assembler.cc 20KB
platform-linux.cc 20KB
codegen.cc 18KB
accessors.cc 18KB
test-decls.cc 17KB
string-stream.cc 17KB
platform-freebsd.cc 17KB
test-strings.cc 16KB
flags.cc 16KB
compilation-cache.cc 16KB
platform-macos.cc 15KB
compiler.cc 15KB
ast.cc 15KB
log-utils.cc 14KB
jump-target.cc 14KB
jump-target-ia32.cc 14KB
jump-target-x64.cc 14KB
regexp-macro-assembler-tracer.cc 13KB
regexp-macro-assembler-irregexp.cc 13KB
debug-agent.cc 13KB
virtual-frame-arm.cc 12KB
virtual-frame.cc 12KB
jump-target-arm.cc 12KB
v8threads.cc 12KB
usage-analyzer.cc 12KB
global-handles.cc 11KB
disassembler.cc 11KB
test-assembler-ia32.cc 11KB
test-log-utils.cc 11KB
shell.cc 11KB
test-disasm-arm.cc 11KB
test-disasm-ia32.cc 11KB
test-mark-compact.cc 10KB
test-log-ia32.cc 10KB
d8-debug.cc 10KB
共 807 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
- ZouXuanXuan4562013-12-06东西是正确的,要是能把编译过程和过程中会遇到的问题和解决办法一起给出来就完美了
- dxm_new82011-10-20不知道为什么这个不能用VC6编译啊?我们公司目前为了兼容系统,最低的是工作在WIN2000下,所有最好的是能兼容VC6啊。
- camsharping2013-01-31作为经典的JS引擎,对于想研究这方面的同学还是值得看看的。只是编译不太方便,如果有些辅助说明文档就更好了
幽兔
- 粉丝: 6
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Python项目之淘宝模拟登录.zip
- 课程设计项目:python+QT实现的小型编译器.zip
- (源码)基于AVR ATmega644的智能卡AES解密系统.zip
- (源码)基于C++插件框架的计算与打印系统.zip
- (源码)基于Spring Boot和Vue的苍穹外卖管理系统.zip
- (源码)基于wxWidgets库的QMiniIDE游戏开发环境管理系统.zip
- 通过C++实现原型模式(Prototype Pattern).rar
- 学习记录111111111111111111111111
- 通过java实现原型模式(Prototype Pattern).rar
- 通过python实现原型模式(Prototype Pattern).rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功