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

Side by Side Diff: src/x64/code-stubs-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 Label not_oddball; 3217 Label not_oddball;
3218 __ CmpInstanceType(rdi, ODDBALL_TYPE); 3218 __ CmpInstanceType(rdi, ODDBALL_TYPE);
3219 __ j(not_equal, &not_oddball, Label::kNear); 3219 __ j(not_equal, &not_oddball, Label::kNear);
3220 __ movp(rax, FieldOperand(rax, Oddball::kToNumberOffset)); 3220 __ movp(rax, FieldOperand(rax, Oddball::kToNumberOffset));
3221 __ Ret(); 3221 __ Ret();
3222 __ bind(&not_oddball); 3222 __ bind(&not_oddball);
3223 3223
3224 __ PopReturnAddressTo(rcx); // Pop return address. 3224 __ PopReturnAddressTo(rcx); // Pop return address.
3225 __ Push(rax); // Push argument. 3225 __ Push(rax); // Push argument.
3226 __ PushReturnAddressFrom(rcx); // Push return address. 3226 __ PushReturnAddressFrom(rcx); // Push return address.
3227 __ InvokeBuiltin(Context::TO_NUMBER_BUILTIN_INDEX, JUMP_FUNCTION); 3227 __ TailCallRuntime(Runtime::kToNumber, 1, 1);
3228 } 3228 }
3229 3229
3230 3230
3231 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 3231 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
3232 Register left, 3232 Register left,
3233 Register right, 3233 Register right,
3234 Register scratch1, 3234 Register scratch1,
3235 Register scratch2) { 3235 Register scratch2) {
3236 Register length = scratch1; 3236 Register length = scratch1;
3237 3237
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
5477 kStackSpace, nullptr, return_value_operand, NULL); 5477 kStackSpace, nullptr, return_value_operand, NULL);
5478 } 5478 }
5479 5479
5480 5480
5481 #undef __ 5481 #undef __
5482 5482
5483 } // namespace internal 5483 } // namespace internal
5484 } // namespace v8 5484 } // namespace v8
5485 5485
5486 #endif // V8_TARGET_ARCH_X64 5486 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects.cc ('K') | « src/symbol.js ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698