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

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

Issue 657273002: X87: Implement inline %_IsJSProxy() for full codegen and Hydrogen. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@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
« no previous file with comments | « no previous file | 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_X87 7 #if V8_TARGET_ARCH_X87
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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3318 3318
3319 __ JumpIfSmi(eax, if_false); 3319 __ JumpIfSmi(eax, if_false);
3320 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); 3320 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx);
3321 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3321 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3322 Split(equal, if_true, if_false, fall_through); 3322 Split(equal, if_true, if_false, fall_through);
3323 3323
3324 context()->Plug(if_true, if_false); 3324 context()->Plug(if_true, if_false);
3325 } 3325 }
3326 3326
3327 3327
3328 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) {
3329 ZoneList<Expression*>* args = expr->arguments();
3330 DCHECK(args->length() == 1);
3331
3332 VisitForAccumulatorValue(args->at(0));
3333
3334 Label materialize_true, materialize_false;
3335 Label* if_true = NULL;
3336 Label* if_false = NULL;
3337 Label* fall_through = NULL;
3338 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3339 &if_false, &fall_through);
3340
3341 __ JumpIfSmi(eax, if_false);
3342 Register map = ebx;
3343 __ mov(map, FieldOperand(eax, HeapObject::kMapOffset));
3344 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE);
3345 __ j(less, if_false);
3346 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE);
3347 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3348 Split(less_equal, if_true, if_false, fall_through);
3349
3350 context()->Plug(if_true, if_false);
3351 }
3352
3328 3353
3329 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { 3354 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
3330 DCHECK(expr->arguments()->length() == 0); 3355 DCHECK(expr->arguments()->length() == 0);
3331 3356
3332 Label materialize_true, materialize_false; 3357 Label materialize_true, materialize_false;
3333 Label* if_true = NULL; 3358 Label* if_true = NULL;
3334 Label* if_false = NULL; 3359 Label* if_false = NULL;
3335 Label* fall_through = NULL; 3360 Label* fall_through = NULL;
3336 context()->PrepareTest(&materialize_true, &materialize_false, 3361 context()->PrepareTest(&materialize_true, &materialize_false,
3337 &if_true, &if_false, &fall_through); 3362 &if_true, &if_false, &fall_through);
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
5096 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5121 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5097 Assembler::target_address_at(call_target_address, 5122 Assembler::target_address_at(call_target_address,
5098 unoptimized_code)); 5123 unoptimized_code));
5099 return OSR_AFTER_STACK_CHECK; 5124 return OSR_AFTER_STACK_CHECK;
5100 } 5125 }
5101 5126
5102 5127
5103 } } // namespace v8::internal 5128 } } // namespace v8::internal
5104 5129
5105 #endif // V8_TARGET_ARCH_X87 5130 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698