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

Side by Side Diff: src/hydrogen.h

Issue 149063010: Remake of the load elimination fix made earlier (r18884). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing on r19056. Created 6 years, 10 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/code-stubs-hydrogen.cc ('k') | src/hydrogen.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 // 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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 ElementsKind elements_kind, 1363 ElementsKind elements_kind,
1364 bool is_store, 1364 bool is_store,
1365 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); 1365 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE);
1366 1366
1367 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); 1367 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access);
1368 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); 1368 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access);
1369 HInstruction* AddLoadStringInstanceType(HValue* string); 1369 HInstruction* AddLoadStringInstanceType(HValue* string);
1370 HInstruction* AddLoadStringLength(HValue* string); 1370 HInstruction* AddLoadStringLength(HValue* string);
1371 HStoreNamedField* AddStoreMapNoWriteBarrier(HValue* object, HValue* map) { 1371 HStoreNamedField* AddStoreMapNoWriteBarrier(HValue* object, HValue* map) {
1372 HStoreNamedField* store_map = Add<HStoreNamedField>( 1372 HStoreNamedField* store_map = Add<HStoreNamedField>(
1373 object, HObjectAccess::ForMap(), map, INITIALIZING_STORE); 1373 object, HObjectAccess::ForMap(), map);
1374 store_map->SkipWriteBarrier(); 1374 store_map->SkipWriteBarrier();
1375 return store_map; 1375 return store_map;
1376 } 1376 }
1377 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map> map); 1377 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map> map);
1378 HStoreNamedField* AddStoreMapConstantNoWriteBarrier(HValue* object, 1378 HStoreNamedField* AddStoreMapConstantNoWriteBarrier(HValue* object,
1379 Handle<Map> map) { 1379 Handle<Map> map) {
1380 HStoreNamedField* store_map = AddStoreMapConstant(object, map); 1380 HStoreNamedField* store_map = AddStoreMapConstant(object, map);
1381 store_map->SkipWriteBarrier(); 1381 store_map->SkipWriteBarrier();
1382 return store_map; 1382 return store_map;
1383 } 1383 }
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 if (IsArrayLength()) { 2315 if (IsArrayLength()) {
2316 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); 2316 *access = HObjectAccess::ForArrayLength(map()->elements_kind());
2317 return true; 2317 return true;
2318 } 2318 }
2319 int offset; 2319 int offset;
2320 if (Accessors::IsJSObjectFieldAccessor(type_, name_, &offset)) { 2320 if (Accessors::IsJSObjectFieldAccessor(type_, name_, &offset)) {
2321 if (type_->Is(HeapType::String())) { 2321 if (type_->Is(HeapType::String())) {
2322 ASSERT(name_->Equals(isolate()->heap()->length_string())); 2322 ASSERT(name_->Equals(isolate()->heap()->length_string()));
2323 *access = HObjectAccess::ForStringLength(); 2323 *access = HObjectAccess::ForStringLength();
2324 } else { 2324 } else {
2325 *access = HObjectAccess::ForJSObjectOffset(offset); 2325 *access = HObjectAccess::ForMapAndOffset(map(), offset);
2326 } 2326 }
2327 return true; 2327 return true;
2328 } 2328 }
2329 return false; 2329 return false;
2330 } 2330 }
2331 2331
2332 bool has_holder() { return !holder_.is_null(); } 2332 bool has_holder() { return !holder_.is_null(); }
2333 2333
2334 LookupResult* lookup() { return &lookup_; } 2334 LookupResult* lookup() { return &lookup_; }
2335 Handle<JSObject> holder() { return holder_; } 2335 Handle<JSObject> holder() { return holder_; }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 } 2716 }
2717 2717
2718 private: 2718 private:
2719 HGraphBuilder* builder_; 2719 HGraphBuilder* builder_;
2720 }; 2720 };
2721 2721
2722 2722
2723 } } // namespace v8::internal 2723 } } // namespace v8::internal
2724 2724
2725 #endif // V8_HYDROGEN_H_ 2725 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698