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

Side by Side Diff: src/hydrogen.cc

Issue 228093004: Implement handlified String::Flatten. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: even shorter Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | src/json-parser.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4911 matching lines...) Expand 10 before | Expand all | Expand 10 after
4922 } 4922 }
4923 4923
4924 if (type == kUseCell) { 4924 if (type == kUseCell) {
4925 Handle<GlobalObject> global(current_info()->global_object()); 4925 Handle<GlobalObject> global(current_info()->global_object());
4926 Handle<PropertyCell> cell(global->GetPropertyCell(&lookup)); 4926 Handle<PropertyCell> cell(global->GetPropertyCell(&lookup));
4927 if (cell->type()->IsConstant()) { 4927 if (cell->type()->IsConstant()) {
4928 cell->AddDependentCompilationInfo(top_info()); 4928 cell->AddDependentCompilationInfo(top_info());
4929 Handle<Object> constant_object = cell->type()->AsConstant(); 4929 Handle<Object> constant_object = cell->type()->AsConstant();
4930 if (constant_object->IsConsString()) { 4930 if (constant_object->IsConsString()) {
4931 constant_object = 4931 constant_object =
4932 FlattenGetString(Handle<String>::cast(constant_object)); 4932 String::Flatten(Handle<String>::cast(constant_object));
4933 } 4933 }
4934 HConstant* constant = New<HConstant>(constant_object); 4934 HConstant* constant = New<HConstant>(constant_object);
4935 return ast_context()->ReturnInstruction(constant, expr->id()); 4935 return ast_context()->ReturnInstruction(constant, expr->id());
4936 } else { 4936 } else {
4937 HLoadGlobalCell* instr = 4937 HLoadGlobalCell* instr =
4938 New<HLoadGlobalCell>(cell, lookup.GetPropertyDetails()); 4938 New<HLoadGlobalCell>(cell, lookup.GetPropertyDetails());
4939 return ast_context()->ReturnInstruction(instr, expr->id()); 4939 return ast_context()->ReturnInstruction(instr, expr->id());
4940 } 4940 }
4941 } else { 4941 } else {
4942 HValue* global_object = Add<HLoadNamedField>( 4942 HValue* global_object = Add<HLoadNamedField>(
(...skipping 6559 matching lines...) Expand 10 before | Expand all | Expand 10 after
11502 if (ShouldProduceTraceOutput()) { 11502 if (ShouldProduceTraceOutput()) {
11503 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11503 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11504 } 11504 }
11505 11505
11506 #ifdef DEBUG 11506 #ifdef DEBUG
11507 graph_->Verify(false); // No full verify. 11507 graph_->Verify(false); // No full verify.
11508 #endif 11508 #endif
11509 } 11509 }
11510 11510
11511 } } // namespace v8::internal 11511 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698