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

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

Issue 170253002: Revert r19409: "Allow ICs to be generated for own global proxy." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.h ('k') | src/ic.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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 1044
1045 1045
1046 template <> 1046 template <>
1047 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { 1047 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
1048 StoreGlobalStub* stub = casted_stub(); 1048 StoreGlobalStub* stub = casted_stub();
1049 Handle<Object> hole(isolate()->heap()->the_hole_value(), isolate()); 1049 Handle<Object> hole(isolate()->heap()->the_hole_value(), isolate());
1050 Handle<Object> placeholer_value(Smi::FromInt(0), isolate()); 1050 Handle<Object> placeholer_value(Smi::FromInt(0), isolate());
1051 Handle<PropertyCell> placeholder_cell = 1051 Handle<PropertyCell> placeholder_cell =
1052 isolate()->factory()->NewPropertyCell(placeholer_value); 1052 isolate()->factory()->NewPropertyCell(placeholer_value);
1053 1053
1054 HParameter* receiver = GetParameter(0);
1054 HParameter* value = GetParameter(2); 1055 HParameter* value = GetParameter(2);
1055 1056
1056 if (stub->check_global()) { 1057 // Check that the map of the global has not changed: use a placeholder map
1057 // Check that the map of the global has not changed: use a placeholder map 1058 // that will be replaced later with the global object's map.
1058 // that will be replaced later with the global object's map. 1059 Handle<Map> placeholder_map = isolate()->factory()->meta_map();
1059 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); 1060 Add<HCheckMaps>(receiver, placeholder_map, top_info());
1060 HValue* global = Add<HConstant>(
1061 StoreGlobalStub::global_placeholder(isolate()));
1062 Add<HCheckMaps>(global, placeholder_map, top_info());
1063 }
1064 1061
1065 HValue* cell = Add<HConstant>(placeholder_cell); 1062 HValue* cell = Add<HConstant>(placeholder_cell);
1066 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); 1063 HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
1067 HValue* cell_contents = Add<HLoadNamedField>( 1064 HValue* cell_contents = Add<HLoadNamedField>(
1068 cell, static_cast<HValue*>(NULL), access); 1065 cell, static_cast<HValue*>(NULL), access);
1069 1066
1070 if (stub->is_constant()) { 1067 if (stub->is_constant()) {
1071 IfBuilder builder(this); 1068 IfBuilder builder(this);
1072 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); 1069 builder.If<HCompareObjectEqAndBranch>(cell_contents, value);
1073 builder.Then(); 1070 builder.Then();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 return BuildRegExpConstructResult(length, index, input); 1417 return BuildRegExpConstructResult(length, index, input);
1421 } 1418 }
1422 1419
1423 1420
1424 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { 1421 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) {
1425 return DoGenerateCode(isolate, this); 1422 return DoGenerateCode(isolate, this);
1426 } 1423 }
1427 1424
1428 1425
1429 } } // namespace v8::internal 1426 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698