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

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

Issue 118553003: Upgrade Symbol implementation to match current ES6 behavior. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Remove uninteresting equality test Created 6 years, 10 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 if (RecordCallTarget()) { 2263 if (RecordCallTarget()) {
2264 GenerateRecordCallTarget(masm); 2264 GenerateRecordCallTarget(masm);
2265 } 2265 }
2266 } 2266 }
2267 2267
2268 // Fast-case: Just invoke the function. 2268 // Fast-case: Just invoke the function.
2269 ParameterCount actual(argc_); 2269 ParameterCount actual(argc_);
2270 2270
2271 if (CallAsMethod()) { 2271 if (CallAsMethod()) {
2272 if (NeedsChecks()) { 2272 if (NeedsChecks()) {
2273 // FIXME: expedient but expensive; surely a better way?
2274 // Always call ToObject() on symbol values.
2275 Label not_a_symbol;
2276 __ movp(rax, Operand(rsp, (argc_ + 1) * kPointerSize));
2277 __ JumpIfSmi(rax, &not_a_symbol, Label::kNear);
2278 __ CmpObjectType(rax, SYMBOL_TYPE, rcx);
2279 __ j(equal, &wrap);
2280
2281 __ bind(&not_a_symbol);
2273 // Do not transform the receiver for strict mode functions. 2282 // Do not transform the receiver for strict mode functions.
2274 __ movp(rcx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 2283 __ movp(rcx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
2275 __ testb(FieldOperand(rcx, SharedFunctionInfo::kStrictModeByteOffset), 2284 __ testb(FieldOperand(rcx, SharedFunctionInfo::kStrictModeByteOffset),
2276 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); 2285 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
2277 __ j(not_equal, &cont); 2286 __ j(not_equal, &cont);
2278 2287
2279 // Do not transform the receiver for natives. 2288 // Do not transform the receiver for natives.
2280 // SharedFunctionInfo is already loaded into rcx. 2289 // SharedFunctionInfo is already loaded into rcx.
2281 __ testb(FieldOperand(rcx, SharedFunctionInfo::kNativeByteOffset), 2290 __ testb(FieldOperand(rcx, SharedFunctionInfo::kNativeByteOffset),
2282 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); 2291 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte));
(...skipping 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after
5294 return_value_operand, 5303 return_value_operand,
5295 NULL); 5304 NULL);
5296 } 5305 }
5297 5306
5298 5307
5299 #undef __ 5308 #undef __
5300 5309
5301 } } // namespace v8::internal 5310 } } // namespace v8::internal
5302 5311
5303 #endif // V8_TARGET_ARCH_X64 5312 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698