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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 651223002: Implement inline %_IsJSProxy() for full codegen and Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/v8natives.js ('k') | no next file » | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 3323
3324 __ JumpIfSmi(rax, if_false); 3324 __ JumpIfSmi(rax, if_false);
3325 __ CmpObjectType(rax, JS_REGEXP_TYPE, rbx); 3325 __ CmpObjectType(rax, JS_REGEXP_TYPE, rbx);
3326 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3326 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3327 Split(equal, if_true, if_false, fall_through); 3327 Split(equal, if_true, if_false, fall_through);
3328 3328
3329 context()->Plug(if_true, if_false); 3329 context()->Plug(if_true, if_false);
3330 } 3330 }
3331 3331
3332 3332
3333 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) {
3334 ZoneList<Expression*>* args = expr->arguments();
3335 DCHECK(args->length() == 1);
3336
3337 VisitForAccumulatorValue(args->at(0));
3338
3339 Label materialize_true, materialize_false;
3340 Label* if_true = NULL;
3341 Label* if_false = NULL;
3342 Label* fall_through = NULL;
3343 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3344 &if_false, &fall_through);
3345
3346 __ JumpIfSmi(rax, if_false);
3347 Register map = rbx;
3348 __ movp(map, FieldOperand(rax, HeapObject::kMapOffset));
3349 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE);
3350 __ j(less, if_false);
3351 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE);
3352 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3353 Split(less_equal, if_true, if_false, fall_through);
3354
3355 context()->Plug(if_true, if_false);
3356 }
3357
3333 3358
3334 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { 3359 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
3335 DCHECK(expr->arguments()->length() == 0); 3360 DCHECK(expr->arguments()->length() == 0);
3336 3361
3337 Label materialize_true, materialize_false; 3362 Label materialize_true, materialize_false;
3338 Label* if_true = NULL; 3363 Label* if_true = NULL;
3339 Label* if_false = NULL; 3364 Label* if_false = NULL;
3340 Label* fall_through = NULL; 3365 Label* fall_through = NULL;
3341 context()->PrepareTest(&materialize_true, &materialize_false, 3366 context()->PrepareTest(&materialize_true, &materialize_false,
3342 &if_true, &if_false, &fall_through); 3367 &if_true, &if_false, &fall_through);
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
5125 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5150 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5126 Assembler::target_address_at(call_target_address, 5151 Assembler::target_address_at(call_target_address,
5127 unoptimized_code)); 5152 unoptimized_code));
5128 return OSR_AFTER_STACK_CHECK; 5153 return OSR_AFTER_STACK_CHECK;
5129 } 5154 }
5130 5155
5131 5156
5132 } } // namespace v8::internal 5157 } } // namespace v8::internal
5133 5158
5134 #endif // V8_TARGET_ARCH_X64 5159 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698