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

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

Issue 1378793003: X87: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | src/x87/lithium-codegen-x87.cc » ('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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1408 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1409 Comment cmnt(masm_, "[ RegExpLiteral"); 1409 Comment cmnt(masm_, "[ RegExpLiteral");
1410 Label materialized; 1410 Label materialized;
1411 // Registers will be used as follows: 1411 // Registers will be used as follows:
1412 // edi = JS function. 1412 // edi = JS function.
1413 // ecx = literals array. 1413 // ecx = literals array.
1414 // ebx = regexp literal. 1414 // ebx = regexp literal.
1415 // eax = regexp literal clone. 1415 // eax = regexp literal clone.
1416 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1416 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1417 __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); 1417 __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset));
1418 int literal_offset = 1418 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index());
1419 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize;
1420 __ mov(ebx, FieldOperand(ecx, literal_offset)); 1419 __ mov(ebx, FieldOperand(ecx, literal_offset));
1421 __ cmp(ebx, isolate()->factory()->undefined_value()); 1420 __ cmp(ebx, isolate()->factory()->undefined_value());
1422 __ j(not_equal, &materialized, Label::kNear); 1421 __ j(not_equal, &materialized, Label::kNear);
1423 1422
1424 // Create regexp literal using runtime function 1423 // Create regexp literal using runtime function
1425 // Result will be in eax. 1424 // Result will be in eax.
1426 __ push(ecx); 1425 __ push(ecx);
1427 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1426 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1428 __ push(Immediate(expr->pattern())); 1427 __ push(Immediate(expr->pattern()));
1429 __ push(Immediate(expr->flags())); 1428 __ push(Immediate(expr->flags()));
(...skipping 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after
5134 Assembler::target_address_at(call_target_address, 5133 Assembler::target_address_at(call_target_address,
5135 unoptimized_code)); 5134 unoptimized_code));
5136 return OSR_AFTER_STACK_CHECK; 5135 return OSR_AFTER_STACK_CHECK;
5137 } 5136 }
5138 5137
5139 5138
5140 } // namespace internal 5139 } // namespace internal
5141 } // namespace v8 5140 } // namespace v8
5142 5141
5143 #endif // V8_TARGET_ARCH_X87 5142 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698