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

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

Issue 1542963002: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: [arm64] Poke does not preserve flags with --debug-code. Created 4 years, 11 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
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 __ bind(&fast_case); 1339 __ bind(&fast_case);
1340 __ JumpIfSmi(function, &slow_case); 1340 __ JumpIfSmi(function, &slow_case);
1341 __ CompareObjectType(function, function_map, scratch, JS_FUNCTION_TYPE); 1341 __ CompareObjectType(function, function_map, scratch, JS_FUNCTION_TYPE);
1342 __ b(ne, &slow_case); 1342 __ b(ne, &slow_case);
1343 1343
1344 // Ensure that {function} has an instance prototype. 1344 // Ensure that {function} has an instance prototype.
1345 __ ldrb(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); 1345 __ ldrb(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
1346 __ tst(scratch, Operand(1 << Map::kHasNonInstancePrototype)); 1346 __ tst(scratch, Operand(1 << Map::kHasNonInstancePrototype));
1347 __ b(ne, &slow_case); 1347 __ b(ne, &slow_case);
1348 1348
1349 // Ensure that {function} is not bound.
1350 Register const shared_info = scratch;
1351 __ ldr(shared_info,
1352 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
1353 __ ldr(scratch, FieldMemOperand(shared_info,
1354 SharedFunctionInfo::kCompilerHintsOffset));
1355 __ tst(scratch,
1356 Operand(Smi::FromInt(1 << SharedFunctionInfo::kBoundFunction)));
1357 __ b(ne, &slow_case);
1358
1359 // Get the "prototype" (or initial map) of the {function}. 1349 // Get the "prototype" (or initial map) of the {function}.
1360 __ ldr(function_prototype, 1350 __ ldr(function_prototype,
1361 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 1351 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
1362 __ AssertNotSmi(function_prototype); 1352 __ AssertNotSmi(function_prototype);
1363 1353
1364 // Resolve the prototype if the {function} has an initial map. Afterwards the 1354 // Resolve the prototype if the {function} has an initial map. Afterwards the
1365 // {function_prototype} will be either the JSReceiver prototype object or the 1355 // {function_prototype} will be either the JSReceiver prototype object or the
1366 // hole value, which means that no instances of the {function} were created so 1356 // hole value, which means that no instances of the {function} were created so
1367 // far and hence we should return false. 1357 // far and hence we should return false.
1368 Label function_prototype_valid; 1358 Label function_prototype_valid;
(...skipping 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after
5400 MemOperand(fp, 6 * kPointerSize), NULL); 5390 MemOperand(fp, 6 * kPointerSize), NULL);
5401 } 5391 }
5402 5392
5403 5393
5404 #undef __ 5394 #undef __
5405 5395
5406 } // namespace internal 5396 } // namespace internal
5407 } // namespace v8 5397 } // namespace v8
5408 5398
5409 #endif // V8_TARGET_ARCH_ARM 5399 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698