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

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

Issue 166233004: Allow ICs to be generated for own global proxy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix prototype chain check 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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 1023
1024 1024
1025 template <> 1025 template <>
1026 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { 1026 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
1027 StoreGlobalStub* stub = casted_stub(); 1027 StoreGlobalStub* stub = casted_stub();
1028 Handle<Object> hole(isolate()->heap()->the_hole_value(), isolate()); 1028 Handle<Object> hole(isolate()->heap()->the_hole_value(), isolate());
1029 Handle<Object> placeholer_value(Smi::FromInt(0), isolate()); 1029 Handle<Object> placeholer_value(Smi::FromInt(0), isolate());
1030 Handle<PropertyCell> placeholder_cell = 1030 Handle<PropertyCell> placeholder_cell =
1031 isolate()->factory()->NewPropertyCell(placeholer_value); 1031 isolate()->factory()->NewPropertyCell(placeholer_value);
1032 1032
1033 HParameter* receiver = GetParameter(0);
1034 HParameter* value = GetParameter(2); 1033 HParameter* value = GetParameter(2);
1035 1034
1036 // Check that the map of the global has not changed: use a placeholder map 1035 if (stub->check_global()) {
1037 // that will be replaced later with the global object's map. 1036 // Check that the map of the global has not changed: use a placeholder map
1038 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); 1037 // that will be replaced later with the global object's map.
1039 Add<HCheckMaps>(receiver, placeholder_map, top_info()); 1038 Handle<Map> placeholder_map = isolate()->factory()->meta_map();
1039 HValue* global = Add<HConstant>(
1040 StoreGlobalStub::global_placeholder(isolate()));
1041 Add<HCheckMaps>(global, placeholder_map, top_info());
1042 }
1040 1043
1041 HValue* cell = Add<HConstant>(placeholder_cell); 1044 HValue* cell = Add<HConstant>(placeholder_cell);
1042 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); 1045 HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
1043 HValue* cell_contents = Add<HLoadNamedField>( 1046 HValue* cell_contents = Add<HLoadNamedField>(
1044 cell, static_cast<HValue*>(NULL), access); 1047 cell, static_cast<HValue*>(NULL), access);
1045 1048
1046 if (stub->is_constant()) { 1049 if (stub->is_constant()) {
1047 IfBuilder builder(this); 1050 IfBuilder builder(this);
1048 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); 1051 builder.If<HCompareObjectEqAndBranch>(cell_contents, value);
1049 builder.Then(); 1052 builder.Then();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 return BuildRegExpConstructResult(length, index, input); 1399 return BuildRegExpConstructResult(length, index, input);
1397 } 1400 }
1398 1401
1399 1402
1400 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { 1403 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) {
1401 return DoGenerateCode(isolate, this); 1404 return DoGenerateCode(isolate, this);
1402 } 1405 }
1403 1406
1404 1407
1405 } } // namespace v8::internal 1408 } } // 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