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

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

Issue 170343002: Reland "Allow ICs to be generated for own global proxy." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix setting through global proxy without interceptor setter. 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);
1055 HParameter* value = GetParameter(2); 1054 HParameter* value = GetParameter(2);
1056 1055
1057 // Check that the map of the global has not changed: use a placeholder map 1056 if (stub->check_global()) {
1058 // that will be replaced later with the global object's map. 1057 // Check that the map of the global has not changed: use a placeholder map
1059 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); 1058 // that will be replaced later with the global object's map.
1060 Add<HCheckMaps>(receiver, placeholder_map, top_info()); 1059 Handle<Map> placeholder_map = isolate()->factory()->meta_map();
1060 HValue* global = Add<HConstant>(
1061 StoreGlobalStub::global_placeholder(isolate()));
1062 Add<HCheckMaps>(global, placeholder_map, top_info());
1063 }
1061 1064
1062 HValue* cell = Add<HConstant>(placeholder_cell); 1065 HValue* cell = Add<HConstant>(placeholder_cell);
1063 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); 1066 HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
1064 HValue* cell_contents = Add<HLoadNamedField>( 1067 HValue* cell_contents = Add<HLoadNamedField>(
1065 cell, static_cast<HValue*>(NULL), access); 1068 cell, static_cast<HValue*>(NULL), access);
1066 1069
1067 if (stub->is_constant()) { 1070 if (stub->is_constant()) {
1068 IfBuilder builder(this); 1071 IfBuilder builder(this);
1069 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); 1072 builder.If<HCompareObjectEqAndBranch>(cell_contents, value);
1070 builder.Then(); 1073 builder.Then();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 return BuildRegExpConstructResult(length, index, input); 1420 return BuildRegExpConstructResult(length, index, input);
1418 } 1421 }
1419 1422
1420 1423
1421 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { 1424 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) {
1422 return DoGenerateCode(isolate, this); 1425 return DoGenerateCode(isolate, this);
1423 } 1426 }
1424 1427
1425 1428
1426 } } // namespace v8::internal 1429 } } // 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