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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 11962041: Revert r13409 ("Make the array bounds check elimination phase optional (and set the foundation for … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 22 matching lines...) Expand all
33 33
34 namespace v8 { 34 namespace v8 {
35 namespace internal { 35 namespace internal {
36 36
37 37
38 Handle<Code> HydrogenCodeStub::CodeFromGraph(HGraph* graph) { 38 Handle<Code> HydrogenCodeStub::CodeFromGraph(HGraph* graph) {
39 graph->OrderBlocks(); 39 graph->OrderBlocks();
40 graph->AssignDominators(); 40 graph->AssignDominators();
41 graph->CollectPhis(); 41 graph->CollectPhis();
42 graph->InsertRepresentationChanges(); 42 graph->InsertRepresentationChanges();
43 graph->ApplyActualValues(); 43 graph->EliminateRedundantBoundsChecks();
44 LChunk* chunk = LChunk::NewChunk(graph); 44 LChunk* chunk = LChunk::NewChunk(graph);
45 ASSERT(chunk != NULL); 45 ASSERT(chunk != NULL);
46 Handle<Code> stub = chunk->Codegen(Code::COMPILED_STUB); 46 Handle<Code> stub = chunk->Codegen(Code::COMPILED_STUB);
47 return stub; 47 return stub;
48 } 48 }
49 49
50 50
51 class CodeStubGraphBuilderBase : public HGraphBuilder { 51 class CodeStubGraphBuilderBase : public HGraphBuilder {
52 public: 52 public:
53 CodeStubGraphBuilderBase(Isolate* isolate, HydrogenCodeStub* stub) 53 CodeStubGraphBuilderBase(Isolate* isolate, HydrogenCodeStub* stub)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 Stub* casted_stub() { return static_cast<Stub*>(stub()); } 116 Stub* casted_stub() { return static_cast<Stub*>(stub()); }
117 }; 117 };
118 118
119 119
120 template <> 120 template <>
121 void CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() { 121 void CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
122 Zone* zone = this->zone(); 122 Zone* zone = this->zone();
123 123
124 HInstruction* load = BuildUncheckedMonomorphicElementAccess( 124 HInstruction* load = BuildUncheckedMonomorphicElementAccess(
125 GetParameter(0), GetParameter(1), NULL, NULL, 125 GetParameter(0), GetParameter(1), NULL, NULL,
126 casted_stub()->is_js_array(), casted_stub()->elements_kind(), 126 casted_stub()->is_js_array(), casted_stub()->elements_kind(), false);
127 false, Representation::Tagged());
128 AddInstruction(load); 127 AddInstruction(load);
129 128
130 HReturn* ret = new(zone) HReturn(load, context()); 129 HReturn* ret = new(zone) HReturn(load, context());
131 current_block()->Finish(ret); 130 current_block()->Finish(ret);
132 } 131 }
133 132
134 133
135 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { 134 Handle<Code> KeyedLoadFastElementStub::GenerateCode() {
136 CodeStubGraphBuilder<KeyedLoadFastElementStub> builder(this); 135 CodeStubGraphBuilder<KeyedLoadFastElementStub> builder(this);
137 return CodeFromGraph(builder.CreateGraph()); 136 return CodeFromGraph(builder.CreateGraph());
138 } 137 }
139 138
140 139
141 } } // namespace v8::internal 140 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698