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

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

Issue 1548253002: X87: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 12 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/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.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_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 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 __ bind(&fast_case); 2262 __ bind(&fast_case);
2263 __ JumpIfSmi(function, &slow_case); 2263 __ JumpIfSmi(function, &slow_case);
2264 __ CmpObjectType(function, JS_FUNCTION_TYPE, function_map); 2264 __ CmpObjectType(function, JS_FUNCTION_TYPE, function_map);
2265 __ j(not_equal, &slow_case); 2265 __ j(not_equal, &slow_case);
2266 2266
2267 // Ensure that {function} has an instance prototype. 2267 // Ensure that {function} has an instance prototype.
2268 __ test_b(FieldOperand(function_map, Map::kBitFieldOffset), 2268 __ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
2269 static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype)); 2269 static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype));
2270 __ j(not_zero, &slow_case); 2270 __ j(not_zero, &slow_case);
2271 2271
2272 // Ensure that {function} is not bound.
2273 Register const shared_info = scratch;
2274 __ mov(shared_info,
2275 FieldOperand(function, JSFunction::kSharedFunctionInfoOffset));
2276 __ BooleanBitTest(shared_info, SharedFunctionInfo::kCompilerHintsOffset,
2277 SharedFunctionInfo::kBoundFunction);
2278 __ j(not_zero, &slow_case);
2279
2280 // Get the "prototype" (or initial map) of the {function}. 2272 // Get the "prototype" (or initial map) of the {function}.
2281 __ mov(function_prototype, 2273 __ mov(function_prototype,
2282 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 2274 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
2283 __ AssertNotSmi(function_prototype); 2275 __ AssertNotSmi(function_prototype);
2284 2276
2285 // Resolve the prototype if the {function} has an initial map. Afterwards the 2277 // Resolve the prototype if the {function} has an initial map. Afterwards the
2286 // {function_prototype} will be either the JSReceiver prototype object or the 2278 // {function_prototype} will be either the JSReceiver prototype object or the
2287 // hole value, which means that no instances of the {function} were created so 2279 // hole value, which means that no instances of the {function} were created so
2288 // far and hence we should return false. 2280 // far and hence we should return false.
2289 Label function_prototype_valid; 2281 Label function_prototype_valid;
(...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after
5359 Operand(ebp, 7 * kPointerSize), NULL); 5351 Operand(ebp, 7 * kPointerSize), NULL);
5360 } 5352 }
5361 5353
5362 5354
5363 #undef __ 5355 #undef __
5364 5356
5365 } // namespace internal 5357 } // namespace internal
5366 } // namespace v8 5358 } // namespace v8
5367 5359
5368 #endif // V8_TARGET_ARCH_X87 5360 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698