Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 ZoneList<Expression*>* args = expr->arguments(); | 500 ZoneList<Expression*>* args = expr->arguments(); |
| 501 DCHECK(args->length() == 3); | 501 DCHECK(args->length() == 3); |
| 502 VisitForStackValue(args->at(0)); | 502 VisitForStackValue(args->at(0)); |
| 503 VisitForStackValue(args->at(1)); | 503 VisitForStackValue(args->at(1)); |
| 504 VisitForStackValue(args->at(2)); | 504 VisitForStackValue(args->at(2)); |
| 505 __ CallStub(&stub); | 505 __ CallStub(&stub); |
| 506 OperandStackDepthDecrement(3); | 506 OperandStackDepthDecrement(3); |
| 507 context()->Plug(result_register()); | 507 context()->Plug(result_register()); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void FullCodeGenerator::EmitNewObject(CallRuntime* expr) { | |
| 511 // Load the arguments on the stack and call the stub. | |
|
Benedikt Meurer
2016/03/31 17:49:29
Please use EmitIntrinsicAsStubCall here.
Camillo Bruni
2016/04/01 10:44:13
Could swear that I tried that :D
| |
| 512 FastNewObjectStub stub(isolate()); | |
| 513 ZoneList<Expression*>* args = expr->arguments(); | |
| 514 DCHECK(args->length() == 2); | |
| 515 VisitForStackValue(args->at(0)); | |
| 516 VisitForStackValue(args->at(1)); | |
| 517 __ Pop(stub.GetCallInterfaceDescriptor().GetRegisterParameter(1)); | |
| 518 __ Pop(stub.GetCallInterfaceDescriptor().GetRegisterParameter(0)); | |
| 519 __ CallStub(&stub); | |
| 520 OperandStackDepthDecrement(2); | |
| 521 context()->Plug(result_register()); | |
| 522 } | |
| 510 | 523 |
| 511 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { | 524 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { |
| 512 // Load the arguments on the stack and call the stub. | 525 // Load the arguments on the stack and call the stub. |
| 513 RegExpExecStub stub(isolate()); | 526 RegExpExecStub stub(isolate()); |
| 514 ZoneList<Expression*>* args = expr->arguments(); | 527 ZoneList<Expression*>* args = expr->arguments(); |
| 515 DCHECK(args->length() == 4); | 528 DCHECK(args->length() == 4); |
| 516 VisitForStackValue(args->at(0)); | 529 VisitForStackValue(args->at(0)); |
| 517 VisitForStackValue(args->at(1)); | 530 VisitForStackValue(args->at(1)); |
| 518 VisitForStackValue(args->at(2)); | 531 VisitForStackValue(args->at(2)); |
| 519 VisitForStackValue(args->at(3)); | 532 VisitForStackValue(args->at(3)); |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1938 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1951 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1939 var->initializer_position() >= proxy->position(); | 1952 var->initializer_position() >= proxy->position(); |
| 1940 } | 1953 } |
| 1941 | 1954 |
| 1942 | 1955 |
| 1943 #undef __ | 1956 #undef __ |
| 1944 | 1957 |
| 1945 | 1958 |
| 1946 } // namespace internal | 1959 } // namespace internal |
| 1947 } // namespace v8 | 1960 } // namespace v8 |
| OLD | NEW |