| 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-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 UNREACHABLE(); | 1300 UNREACHABLE(); |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { | 1303 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { |
| 1304 Comment cmnt(masm_, "[ RegExpLiteral"); | 1304 Comment cmnt(masm_, "[ RegExpLiteral"); |
| 1305 Callable callable = CodeFactory::FastCloneRegExp(isolate()); | 1305 Callable callable = CodeFactory::FastCloneRegExp(isolate()); |
| 1306 CallInterfaceDescriptor descriptor = callable.descriptor(); | 1306 CallInterfaceDescriptor descriptor = callable.descriptor(); |
| 1307 LoadFromFrameField(JavaScriptFrameConstants::kFunctionOffset, | 1307 LoadFromFrameField(JavaScriptFrameConstants::kFunctionOffset, |
| 1308 descriptor.GetRegisterParameter(0)); | 1308 descriptor.GetRegisterParameter(0)); |
| 1309 __ Move(descriptor.GetRegisterParameter(1), | 1309 __ Move(descriptor.GetRegisterParameter(1), |
| 1310 Smi::FromInt(expr->literal_index())); | 1310 SmiFromSlot(expr->literal_slot())); |
| 1311 __ Move(descriptor.GetRegisterParameter(2), expr->pattern()); | 1311 __ Move(descriptor.GetRegisterParameter(2), expr->pattern()); |
| 1312 __ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags())); | 1312 __ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags())); |
| 1313 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 1313 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 1314 | 1314 |
| 1315 // Reload the context register after the call as i.e. TurboFan code stubs | 1315 // Reload the context register after the call as i.e. TurboFan code stubs |
| 1316 // won't preserve the context register. | 1316 // won't preserve the context register. |
| 1317 LoadFromFrameField(StandardFrameConstants::kContextOffset, | 1317 LoadFromFrameField(StandardFrameConstants::kContextOffset, |
| 1318 context_register()); | 1318 context_register()); |
| 1319 context()->Plug(result_register()); | 1319 context()->Plug(result_register()); |
| 1320 } | 1320 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 return info_->has_simple_parameters(); | 1603 return info_->has_simple_parameters(); |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1606 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 1607 | 1607 |
| 1608 #undef __ | 1608 #undef __ |
| 1609 | 1609 |
| 1610 | 1610 |
| 1611 } // namespace internal | 1611 } // namespace internal |
| 1612 } // namespace v8 | 1612 } // namespace v8 |
| OLD | NEW |