- 10 Mar, 2014 1 commit
-
-
bmeurer@chromium.org authored
Fixed the flooring div bug and added a test case. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/191293012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Mar, 2014 6 commits
-
-
yangguo@chromium.org authored
This relands r19704 with a fix to the test case. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/189823003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
Revert "Handle non-power-of-2 divisors in division-like operations", "A64 tweaks for division-like operations." and "Windows build fix.". This reverts commit 19719, 19720 and 19721 because mozilla/ecma/Date/15.9.3.1-1 fails (in release mode only?). TBR=bmeurer@chromium.org Review URL: https://codereview.chromium.org/189963005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/190383002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
Lithium currently supports 3 division-like operations on integral operands: "Normal" division (rounding towards zero), flooring division (rounding towards -Infinity) and modulus calculation (the counterpart for the "normal" division). For divisors which are a power of 2, one can efficiently use some bit fiddling to avoid the actual division for such operations. This CL cleanly splits off these operations into separate Lithium instructions, making the code much more maintainable and more consistent across platforms. There are 2 basic variations of these bit fiddling algorithms: One involving branches and a seemingly more clever one without branches. Choosing between the two is not as easy as it seems: Benchmarks (and probably real-world) programs seem to favor positive dividends, registers and shifting units are sometimes scarce resources, and branch prediction is quite good in modern processors. Therefore only the "normal" division by a power of 2 is implemented in a branch-free manner, this seems to be the best approach in practice. If this turns out to be wrong, we can easily and locally change this. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/175143002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
yangguo@chromium.org authored
This reverts r19704. R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/189533008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
yangguo@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/178583006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Mar, 2014 1 commit
-
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/181053005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Feb, 2014 1 commit
-
-
yangguo@chromium.org authored
R=svenpanne@chromium.org BUG=v8:2938 LOG=N Review URL: https://codereview.chromium.org/172133003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Feb, 2014 1 commit
-
-
vegorov@chromium.org authored
Instead of tracking simple absolute offset from the start of the script like other places do, track a pair of (inlining id, offset from the start of inlined function). This enables us to pinpoint with inlining path an instruction came from. Previously in multi-script environments we emitted positions that made very little sense because inside a single optimized function they would point to different scripts without a way to distinguish them. Start dumping the source of every inlined function to make possible IR viewing tools with integrated source views as there was previously no way to acquire this information from IR dumps. We also dump source position at which each inlining occured. Tracked positions are written into hydrogen.cfg as pos:<inlining-id>_<offset>. Flag --emit-opt-code-positions is renamed by this change into --hydrogen-track-positions to better convey it's meaning. In addition this change assigned global unique identifier to each optimization performed inside isolate. This allows to precisely match compilation artifacts (e.g. IR and disassembly) and deoptimizations. BUG= R=yangguo@chromium.org Review URL: https://codereview.chromium.org/140683011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 30 Jan, 2014 1 commit
-
-
verwaest@chromium.org authored
R=dcarney@chromium.org Review URL: https://codereview.chromium.org/135593006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Jan, 2014 5 commits
-
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/131103021 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/136093004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/139233004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/141583011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/148453009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 28 Jan, 2014 1 commit
-
-
bmeurer@chromium.org authored
HOuterContext can be expressed in terms of HLoadNamedField. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/131513015 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Jan, 2014 1 commit
-
-
svenpanne@chromium.org authored
Made the logic architecture-independent, although we should really have some kind of instruction selection instead of trying to handle some weird cases at the hydrogen level. Some tiny related cleanups on the way. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/141653015 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 17 Jan, 2014 1 commit
-
-
mvstanton@chromium.org authored
Recent changes in IC logic meant that CallStubs no longer use the Contextual bit. IsUndeclaredGlobal() needed to adjust for that. In fact, now the CL has morphed to remove the notion of storing contextual state in the IC at all, it just becomes some extra ic state of the load ic. This took some adjustment in harmony code to use the global receiver for certain stores. Now it's clearer that only LoadICs actually record any information about contextual or not. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/140943002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Jan, 2014 5 commits
-
-
dslomov@chromium.org authored
This adds a fixed array sub-type that will represent a backing store for typed arrays allocated with TypedArray(length) construtor. R=mvstanton@chromium.org, verwaest@chromium.org Review URL: https://codereview.chromium.org/101413006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
dslomov@chromium.org authored
This reverts commit r18649 for breaking Linux/nosnap and Win64 tests. TBR=jkummerow@chromium.org Review URL: https://codereview.chromium.org/140793003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
dslomov@chromium.org authored
This adds a fixed array sub-type that will represent a backing store for typed arrays allocated with TypedArray(length) construtor. R=mvstanton@chromium.org, verwaest@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18646 Review URL: https://codereview.chromium.org/101413006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
dslomov@chromium.org authored
This reverts commit r18646 for breaking Win32 build. TBR=jkummerow@chromium.org Review URL: https://codereview.chromium.org/132233012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
dslomov@chromium.org authored
This adds a fixed array sub-type that will represent a backing store for typed arrays allocated with TypedArray(length) construtor. R=mvstanton@chromium.org, verwaest@chromium.org Review URL: https://codereview.chromium.org/101413006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 Jan, 2014 2 commits
-
-
jarin@chromium.org authored
while having the patch out for code review). R=danno@chromium.org BUG= Review URL: https://codereview.chromium.org/136303004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
jarin@chromium.org authored
call machinery. The change replaces CallNamed, CallKeyed, CallConstantFunction and CallKnownGlobal hydrogen instructions with two new instructions with a more lower level semantics: 1. CallJSFunction for direct calls of JSFunction objects (no argument adaptation) 2. CallWithDescriptor for calls of a given Code object according to the supplied calling convention. Details: CallJSFunction should be straightforward, the main difference from the existing InvokeFunction instruction is the absence of argument adaptor handling. (As a next step, we will replace InvokeFunction with an equivalent hydrogen code.) For CallWithDescriptor, the calling conventions are represented by a tweaked version of CallStubInterfaceDescriptor. In addition to the parameter-register mapping, we also define parameter-representation mapping there. The CallWithDescriptor instruction has variable number of parameters now - this required some simple tweaks in Lithium, which assumed fixed number of arguments in some places. The calling conventions used in the calls are initialized in the CallDescriptors class (code-stubs.h, <arch>/code-stubs-<arch>.cc), and they live in a new table in the Isolate class. I should say I am not quite sure about Representation::Integer32() representation for some of the params of ArgumentAdaptorCall - it is not clear to me wether the params could not end up on the stack and thus confuse the GC. The change also includes an earlier small change to argument adaptor (https://codereview.chromium.org/98463007) that avoids passing a naked pointer to the code entry as a parameter. I am sorry for packaging that with an already biggish change. Performance implications: Locally, I see a small regression (.2% or so). It is hard to say where exactly it comes from, but I do see inefficient call sequences to the adaptor trampoline. For example: ;;; <@78,#24> constant-t bf85aa515a mov edi,0x5a51aa85 ;; debug: position 29 ;;; <@72,#53> load-named-field 8b7717 mov esi,[edi+0x17] ;; debug: position 195 ;;; <@80,#51> constant-s b902000000 mov ecx,0x2 ;; debug: position 195 ;;; <@81,#51> gap 894df0 mov [ebp+0xf0],ecx ;;; <@82,#103> constant-i bb01000000 mov ebx,0x1 ;;; <@84,#102> constant-i b902000000 mov ecx,0x2 ;;; <@85,#102> gap 89d8 mov eax,ebx 89cb mov ebx,ecx 8b4df0 mov ecx,[ebp+0xf0] ;;; <@86,#58> call-with-descriptor e8ef57fcff call ArgumentsAdaptorTrampoline (0x2d80e6e0) ;; code: BUILTIN Note the silly handling of ecx; the hydrogen for this code is: 0 4 s27 Constant 1 range:1_1 <|@ 0 3 t30 Constant 0x5bc1aa85 <JS Function xyz (SharedFunctionInfo 0x5bc1a919)> type:object <|@ 0 1 t36 LoadNamedField t30.[in-object]@24 <|@ 0 1 t38 Constant 0x2300e6a1 <Code> <|@ 0 1 i102 Constant 2 range:2_2 <|@ 0 1 i103 Constant 1 range:1_1 <|@ 0 2 t41 CallWithDescriptor t38 t30 t36 s27 i103 i102 #2 changes[*] <|@ BUG= R=verwaest@chromium.org, danno@chromium.org Review URL: https://codereview.chromium.org/104663004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Jan, 2014 1 commit
-
-
verwaest@chromium.org authored
R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/134333007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Jan, 2014 1 commit
-
-
jarin@chromium.org authored
by escape analysis). Added several tests that expose the bug. Summary: LCodegen::AddToTranslation assumes that Lithium environments are generated by depth-first traversal, but LChunkBuilder::CreateEnvironment was generating them in breadth-first fashion. This fixes the CreateEnvironment to traverse the captured objects depth-first. Note: It might be worth considering representing LEnvironment by a list with the same order as the serialized translation representation rather than having two lists with a subtle relationship between them (and then serialize in a slightly different order again). R=titzer@chromium.org, mstarzinger@chromium.org LOG=N BUG= Review URL: https://codereview.chromium.org/93803003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 18 Dec, 2013 1 commit
-
-
svenpanne@chromium.org authored
It was only used for Math.log, and even then only in full code and in %_MathLog. For crankshafted code, Intel already used the FP operations directly, while the ARM/MIPS ports were a bit lazy and simply called the stub. The latter directly call the C library now without any cache. It would be possible to directly generate machine code if somebody has the time, from what I've seen out in the wild it should be only about a dozen instructions. LOG=y R=yangguo@chromium.org Review URL: https://codereview.chromium.org/113343003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Dec, 2013 1 commit
-
-
yangguo@chromium.org authored
R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/104203003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Dec, 2013 1 commit
-
-
bmeurer@chromium.org authored
R=hpayer@chromium.org, mvstanton@chromium.org Review URL: https://codereview.chromium.org/98673003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 28 Nov, 2013 1 commit
-
-
m.m.capewell@googlemail.com authored
Optimize fixed double arguments to arithmetic Lithium instructions. TEST=none BUG= R=ulan@chromium.org Review URL: https://codereview.chromium.org/91113003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Nov, 2013 1 commit
-
-
svenpanne@chromium.org authored
The main change is that a bit has been added to array buffers to signal that the backing store has to be freed when the buffer dies. BUG=316359 LOG=Y R=yangguo@chromium.org Review URL: https://codereview.chromium.org/82763005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Nov, 2013 2 commits
-
-
danno@chromium.org authored
Revert 17966, 17965 also as collateral damage: Embed trigonometric lookup table. Due to Heapcheck and valgrind failures that are not yet fixed. TBR=svenpanne@chromium.org Review URL: https://codereview.chromium.org/80513004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
This removes tons of architecture-specific code and makes it easy to experiment with other pseudo-RNG algorithms. The crankshafted code is extremely good, keeping all things unboxed and doing only minimal checks, so it is basically equivalent to the handwritten code. When benchmarks are run without parallel recompilation, we get a few percent regression on SunSpider's string-validate-input and string-base64, but these benchmarks run so fast that the overall SunSpider score is hardly affected and within the usual jitter. Note that these benchmarks actually run even faster when we don't crankshaft at all on the main thread (the regression is not caused by bad code, it is caused by Crankshaft needing a few hundred microsecond for compilation of a trivial function). Luckily, when parallel recompilation is enabled, i.e. in the browser, we see no regression at all! R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/68723002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Nov, 2013 1 commit
-
-
danno@chromium.org authored
The %_OneByteSeqStringSetChar intrinsic expects its arguments to be checked before being called for efficiency reasons, but the fuzzer provided no such checks. Now the intrinsic is robust to bad input if FLAG_debug_code is set. R=yangguo@chromium.org TEST=test/mjsunit/regress/regress-320948.js BUG=chromium:320948 LOG=Y Review URL: https://codereview.chromium.org/72813004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Nov, 2013 1 commit
-
-
yangguo@chromium.org authored
R=jkummerow@chromium.org BUG= Review URL: https://codereview.chromium.org/63423004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Nov, 2013 1 commit
-
-
ulan@chromium.org authored
Lithium uses indexes after the maximium value ID in the HGraph as indexes of virtual registers and assumes that the maximum value ID does not change. The IsStandardConstant and GetConstantXX functions could add constants to HGraph, which aliased virtual registers with real values. This could confuse the register allocator to think that a value in a virtual register is tagged and to incorrectly set it in the pointer map. BUG=298269 TEST=mjsunit/regress/regress-298269.js R=verwaest@chromium.org Review URL: https://chromiumcodereview.appspot.com/66693002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Nov, 2013 2 commits
-
-
bmeurer@chromium.org authored
This instruction is required for copying characters from sequential strings in the hydrogenized StringAddStub. BUG=v8:2990 R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/63863005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
This reverts commit r17562 for invalid usage of movw to load string characters. Will reland with fix. TBR=svenpanne@chromium.org Review URL: https://codereview.chromium.org/64333002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-