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

Unified Diff: src/objects.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ca941ce4e21a0c6c0a6b6eb9cc54e8ffd3441054..b6c40d67fe8a64c13d4f7b44779e47281956a306 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8782,6 +8782,19 @@ Handle<DeoptimizationOutputData> DeoptimizationOutputData::New(
}
+// static
+Handle<LiteralsArray> LiteralsArray::New(Isolate* isolate,
+ Handle<TypeFeedbackVector> vector,
+ int number_of_literals,
+ PretenureFlag pretenure) {
+ Handle<FixedArray> literals = isolate->factory()->NewFixedArray(
+ number_of_literals + kFirstLiteralIndex, pretenure);
+ Handle<LiteralsArray> casted_literals = Handle<LiteralsArray>::cast(literals);
+ casted_literals->set_feedback_vector(*vector);
+ return casted_literals;
+}
+
+
int HandlerTable::LookupRange(int pc_offset, int* stack_depth_out,
CatchPrediction* prediction_out) {
int innermost_handler = -1, innermost_start = -1;
@@ -10191,7 +10204,7 @@ void SharedFunctionInfo::AddSharedCodeToOptimizedCodeMap(
void SharedFunctionInfo::AddToOptimizedCodeMap(
Handle<SharedFunctionInfo> shared, Handle<Context> native_context,
- Handle<HeapObject> code, Handle<FixedArray> literals,
+ Handle<HeapObject> code, Handle<LiteralsArray> literals,
BailoutId osr_ast_id) {
Isolate* isolate = shared->GetIsolate();
DCHECK(*code == isolate->heap()->undefined_value() ||
@@ -11381,7 +11394,7 @@ CodeAndLiterals SharedFunctionInfo::SearchOptimizedCodeMap(
DCHECK_LE(entry + kEntryLength, code_map->length());
Object* code = code_map->get(entry + kCachedCodeOffset);
result = {code->IsUndefined() ? nullptr : Code::cast(code),
- FixedArray::cast(code_map->get(entry + kLiteralsOffset))};
+ LiteralsArray::cast(code_map->get(entry + kLiteralsOffset))};
}
}
if (FLAG_trace_opt && !optimized_code_map()->IsSmi() &&
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698