Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 1306303003: [es6] Implement spec compliant ToPrimitive in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comments. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 Label not_oddball; 2974 Label not_oddball;
2975 __ CmpInstanceType(edi, ODDBALL_TYPE); 2975 __ CmpInstanceType(edi, ODDBALL_TYPE);
2976 __ j(not_equal, &not_oddball, Label::kNear); 2976 __ j(not_equal, &not_oddball, Label::kNear);
2977 __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset)); 2977 __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
2978 __ Ret(); 2978 __ Ret();
2979 __ bind(&not_oddball); 2979 __ bind(&not_oddball);
2980 2980
2981 __ pop(ecx); // Pop return address. 2981 __ pop(ecx); // Pop return address.
2982 __ push(eax); // Push argument. 2982 __ push(eax); // Push argument.
2983 __ push(ecx); // Push return address. 2983 __ push(ecx); // Push return address.
2984 __ InvokeBuiltin(Context::TO_NUMBER_BUILTIN_INDEX, JUMP_FUNCTION); 2984 __ TailCallRuntime(Runtime::kToNumber, 1, 1);
2985 } 2985 }
2986 2986
2987 2987
2988 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 2988 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
2989 Register left, 2989 Register left,
2990 Register right, 2990 Register right,
2991 Register scratch1, 2991 Register scratch1,
2992 Register scratch2) { 2992 Register scratch2) {
2993 Register length = scratch1; 2993 Register length = scratch1;
2994 2994
(...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
5216 Operand(ebp, 7 * kPointerSize), NULL); 5216 Operand(ebp, 7 * kPointerSize), NULL);
5217 } 5217 }
5218 5218
5219 5219
5220 #undef __ 5220 #undef __
5221 5221
5222 } // namespace internal 5222 } // namespace internal
5223 } // namespace v8 5223 } // namespace v8
5224 5224
5225 #endif // V8_TARGET_ARCH_X87 5225 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/objects.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698