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

Unified Diff: src/mips64/codegen-mips64.cc

Issue 2626893005: Revert of Internalize strings in-place (Closed)
Patch Set: rebased Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/codegen-mips64.cc
diff --git a/src/mips64/codegen-mips64.cc b/src/mips64/codegen-mips64.cc
index e7f6cb0a88c10d40aa06dc53f09d790f3cbd7312..134fe4dd8887cb00091df087a10435b196fc4ce2 100644
--- a/src/mips64/codegen-mips64.cc
+++ b/src/mips64/codegen-mips64.cc
@@ -612,9 +612,6 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm,
Register index,
Register result,
Label* call_runtime) {
- Label indirect_string_loaded;
- __ bind(&indirect_string_loaded);
-
// Fetch the instance type of the receiver into result register.
__ ld(result, FieldMemOperand(string, HeapObject::kMapOffset));
__ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset));
@@ -625,23 +622,18 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm,
__ Branch(&check_sequential, eq, at, Operand(zero_reg));
// Dispatch on the indirect string shape: slice or cons.
- Label cons_string, thin_string;
- __ And(at, result, Operand(kStringRepresentationMask));
- __ Branch(&cons_string, eq, at, Operand(kConsStringTag));
- __ Branch(&thin_string, eq, at, Operand(kThinStringTag));
+ Label cons_string;
+ __ And(at, result, Operand(kSlicedNotConsMask));
+ __ Branch(&cons_string, eq, at, Operand(zero_reg));
// Handle slices.
+ Label indirect_string_loaded;
__ ld(result, FieldMemOperand(string, SlicedString::kOffsetOffset));
__ ld(string, FieldMemOperand(string, SlicedString::kParentOffset));
__ dsra32(at, result, 0);
__ Daddu(index, index, at);
__ jmp(&indirect_string_loaded);
- // Handle thin strings.
- __ bind(&thin_string);
- __ ld(string, FieldMemOperand(string, ThinString::kActualOffset));
- __ jmp(&indirect_string_loaded);
-
// Handle cons strings.
// Check whether the right hand side is the empty string (i.e. if
// this is really a flat string in a cons string). If that is not
@@ -653,7 +645,10 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm,
__ Branch(call_runtime, ne, result, Operand(at));
// Get the first of the two strings and load its instance type.
__ ld(string, FieldMemOperand(string, ConsString::kFirstOffset));
- __ jmp(&indirect_string_loaded);
+
+ __ bind(&indirect_string_loaded);
+ __ ld(result, FieldMemOperand(string, HeapObject::kMapOffset));
+ __ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset));
// Distinguish sequential and external strings. Only these two string
// representations can reach here (slices and flat cons strings have been
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698