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

Side by Side Diff: src/context-measure.cc

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging with master Created 4 years, 7 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 | « src/builtins.cc ('k') | src/contexts.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/context-measure.h" 5 #include "src/context-measure.h"
6 6
7 #include "src/base/logging.h" 7 #include "src/base/logging.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 ContextMeasure::ContextMeasure(Context* context) 14 ContextMeasure::ContextMeasure(Context* context)
15 : context_(context), 15 : context_(context),
16 root_index_map_(context->GetIsolate()), 16 root_index_map_(context->GetIsolate()),
17 recursion_depth_(0), 17 recursion_depth_(0),
18 count_(0), 18 count_(0),
19 size_(0) { 19 size_(0) {
20 DCHECK(context_->IsNativeContext()); 20 DCHECK(context_->IsNativeContext());
21 Object* next_link = context_->get(Context::NEXT_CONTEXT_LINK); 21 Object* next_link = context_->next_context_link();
22 MeasureObject(context_); 22 MeasureObject(context_);
23 MeasureDeferredObjects(); 23 MeasureDeferredObjects();
24 context_->set(Context::NEXT_CONTEXT_LINK, next_link); 24 context_->set(Context::NEXT_CONTEXT_LINK, next_link);
25 } 25 }
26 26
27 27
28 bool ContextMeasure::IsShared(HeapObject* object) { 28 bool ContextMeasure::IsShared(HeapObject* object) {
29 if (object->IsScript()) return true; 29 if (object->IsScript()) return true;
30 if (object->IsSharedFunctionInfo()) return true; 30 if (object->IsSharedFunctionInfo()) return true;
31 if (object->IsScopeInfo()) return true; 31 if (object->IsScopeInfo()) return true;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 70
71 void ContextMeasure::VisitPointers(Object** start, Object** end) { 71 void ContextMeasure::VisitPointers(Object** start, Object** end) {
72 for (Object** current = start; current < end; current++) { 72 for (Object** current = start; current < end; current++) {
73 if ((*current)->IsSmi()) continue; 73 if ((*current)->IsSmi()) continue;
74 MeasureObject(HeapObject::cast(*current)); 74 MeasureObject(HeapObject::cast(*current));
75 } 75 }
76 } 76 }
77 } // namespace internal 77 } // namespace internal
78 } // namespace v8 78 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698