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

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

Issue 1353363002: Share literals arrays per <NativeContext, SharedFunctionInfo> pair. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 years, 3 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
« no previous file with comments | « no previous file | src/factory.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 HValue* js_function, 1660 HValue* js_function,
1661 HValue* native_context, 1661 HValue* native_context,
1662 IfBuilder* builder, 1662 IfBuilder* builder,
1663 HValue* optimized_map, 1663 HValue* optimized_map,
1664 HValue* map_index) { 1664 HValue* map_index) {
1665 HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt()); 1665 HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt());
1666 HValue* context_slot = LoadFromOptimizedCodeMap( 1666 HValue* context_slot = LoadFromOptimizedCodeMap(
1667 optimized_map, map_index, SharedFunctionInfo::kContextOffset); 1667 optimized_map, map_index, SharedFunctionInfo::kContextOffset);
1668 HValue* osr_ast_slot = LoadFromOptimizedCodeMap( 1668 HValue* osr_ast_slot = LoadFromOptimizedCodeMap(
1669 optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset); 1669 optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset);
1670 HValue* code_object = LoadFromOptimizedCodeMap(
1671 optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset);
1670 builder->If<HCompareObjectEqAndBranch>(native_context, 1672 builder->If<HCompareObjectEqAndBranch>(native_context,
1671 context_slot); 1673 context_slot);
1672 builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none); 1674 builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none);
1675 builder->And();
1676 builder->IfNot<HCompareObjectEqAndBranch>(code_object,
1677 graph()->GetConstantUndefined());
1673 builder->Then(); 1678 builder->Then();
1674 HValue* code_object = LoadFromOptimizedCodeMap(optimized_map,
1675 map_index, SharedFunctionInfo::kCachedCodeOffset);
1676 // and the literals
1677 HValue* literals = LoadFromOptimizedCodeMap(optimized_map, 1679 HValue* literals = LoadFromOptimizedCodeMap(optimized_map,
1678 map_index, SharedFunctionInfo::kLiteralsOffset); 1680 map_index, SharedFunctionInfo::kLiteralsOffset);
1679 1681
1680 BuildInstallOptimizedCode(js_function, native_context, code_object, literals); 1682 BuildInstallOptimizedCode(js_function, native_context, code_object, literals);
1681 1683
1682 // The builder continues in the "then" after this function. 1684 // The builder continues in the "then" after this function.
1683 } 1685 }
1684 1686
1685 1687
1686 void CodeStubGraphBuilderBase::BuildInstallOptimizedCode(HValue* js_function, 1688 void CodeStubGraphBuilderBase::BuildInstallOptimizedCode(HValue* js_function,
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 return Pop(); 2211 return Pop();
2210 } 2212 }
2211 2213
2212 2214
2213 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2215 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2214 return DoGenerateCode(this); 2216 return DoGenerateCode(this);
2215 } 2217 }
2216 2218
2217 } // namespace internal 2219 } // namespace internal
2218 } // namespace v8 2220 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698