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

Side by Side Diff: src/objects.cc

Issue 2125163004: Correctly format builtin constructors in stack traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160704-string-number-builtins
Patch Set: Rebase Created 4 years, 5 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/objects.h ('k') | src/objects-inl.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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 if (info->call_code()->IsCallHandlerInfo() && 988 if (info->call_code()->IsCallHandlerInfo() &&
989 CallHandlerInfo::cast(info->call_code())->fast_handler()->IsCode()) { 989 CallHandlerInfo::cast(info->call_code())->fast_handler()->IsCode()) {
990 code = isolate->builtins()->HandleFastApiCall(); 990 code = isolate->builtins()->HandleFastApiCall();
991 } else { 991 } else {
992 code = isolate->builtins()->HandleApiCall(); 992 code = isolate->builtins()->HandleApiCall();
993 } 993 }
994 bool is_constructor = !info->remove_prototype(); 994 bool is_constructor = !info->remove_prototype();
995 Handle<SharedFunctionInfo> result = 995 Handle<SharedFunctionInfo> result =
996 isolate->factory()->NewSharedFunctionInfo(name, code, is_constructor); 996 isolate->factory()->NewSharedFunctionInfo(name, code, is_constructor);
997 if (is_constructor) { 997 if (is_constructor) {
998 result->set_construct_stub(*isolate->builtins()->JSConstructStubApi()); 998 result->SetConstructStub(*isolate->builtins()->JSConstructStubApi());
999 } 999 }
1000 1000
1001 result->set_length(info->length()); 1001 result->set_length(info->length());
1002 if (class_name->IsString()) result->set_instance_class_name(*class_name); 1002 if (class_name->IsString()) result->set_instance_class_name(*class_name);
1003 result->set_api_func_data(*info); 1003 result->set_api_func_data(*info);
1004 result->DontAdaptArguments(); 1004 result->DontAdaptArguments();
1005 DCHECK(result->IsApiFunction()); 1005 DCHECK(result->IsApiFunction());
1006 1006
1007 info->set_shared_function_info(*result); 1007 info->set_shared_function_info(*result);
1008 return result; 1008 return result;
(...skipping 12228 matching lines...) Expand 10 before | Expand all | Expand 10 after
13237 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); 13237 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
13238 shared_info->set_allows_lazy_compilation_without_context( 13238 shared_info->set_allows_lazy_compilation_without_context(
13239 lit->AllowsLazyCompilationWithoutContext()); 13239 lit->AllowsLazyCompilationWithoutContext());
13240 shared_info->set_language_mode(lit->language_mode()); 13240 shared_info->set_language_mode(lit->language_mode());
13241 shared_info->set_uses_arguments(lit->scope()->arguments() != NULL); 13241 shared_info->set_uses_arguments(lit->scope()->arguments() != NULL);
13242 shared_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); 13242 shared_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
13243 shared_info->set_is_function(lit->is_function()); 13243 shared_info->set_is_function(lit->is_function());
13244 shared_info->set_never_compiled(true); 13244 shared_info->set_never_compiled(true);
13245 shared_info->set_kind(lit->kind()); 13245 shared_info->set_kind(lit->kind());
13246 if (!IsConstructable(lit->kind(), lit->language_mode())) { 13246 if (!IsConstructable(lit->kind(), lit->language_mode())) {
13247 shared_info->set_construct_stub( 13247 shared_info->SetConstructStub(
13248 *shared_info->GetIsolate()->builtins()->ConstructedNonConstructable()); 13248 *shared_info->GetIsolate()->builtins()->ConstructedNonConstructable());
13249 } 13249 }
13250 shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject()); 13250 shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject());
13251 shared_info->set_asm_function(lit->scope()->asm_function()); 13251 shared_info->set_asm_function(lit->scope()->asm_function());
13252 SetExpectedNofPropertiesFromEstimate(shared_info, lit); 13252 SetExpectedNofPropertiesFromEstimate(shared_info, lit);
13253 } 13253 }
13254 13254
13255 13255
13256 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) { 13256 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) {
13257 DCHECK(!id.IsNone()); 13257 DCHECK(!id.IsNone());
13258 Code* unoptimized = code(); 13258 Code* unoptimized = code();
13259 DeoptimizationOutputData* data = 13259 DeoptimizationOutputData* data =
13260 DeoptimizationOutputData::cast(unoptimized->deoptimization_data()); 13260 DeoptimizationOutputData::cast(unoptimized->deoptimization_data());
13261 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this); 13261 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this);
13262 USE(ignore); 13262 USE(ignore);
13263 return true; // Return true if there was no DCHECK. 13263 return true; // Return true if there was no DCHECK.
13264 } 13264 }
13265 13265
13266 void SharedFunctionInfo::SetConstructStub(Code* code) {
13267 if (code->kind() == Code::BUILTIN) code->set_is_construct_stub(true);
13268 set_construct_stub(code);
13269 }
13266 13270
13267 void Map::StartInobjectSlackTracking() { 13271 void Map::StartInobjectSlackTracking() {
13268 DCHECK(!IsInobjectSlackTrackingInProgress()); 13272 DCHECK(!IsInobjectSlackTrackingInProgress());
13269 13273
13270 // No tracking during the snapshot construction phase. 13274 // No tracking during the snapshot construction phase.
13271 Isolate* isolate = GetIsolate(); 13275 Isolate* isolate = GetIsolate();
13272 if (isolate->serializer_enabled()) return; 13276 if (isolate->serializer_enabled()) return;
13273 13277
13274 if (unused_property_fields() == 0) return; 13278 if (unused_property_fields() == 0) return;
13275 13279
(...skipping 5662 matching lines...) Expand 10 before | Expand all | Expand 10 after
18938 18942
18939 Object* data_obj = 18943 Object* data_obj =
18940 constructor->shared()->get_api_func_data()->access_check_info(); 18944 constructor->shared()->get_api_func_data()->access_check_info();
18941 if (data_obj->IsUndefined(isolate)) return nullptr; 18945 if (data_obj->IsUndefined(isolate)) return nullptr;
18942 18946
18943 return AccessCheckInfo::cast(data_obj); 18947 return AccessCheckInfo::cast(data_obj);
18944 } 18948 }
18945 18949
18946 } // namespace internal 18950 } // namespace internal
18947 } // namespace v8 18951 } // namespace v8
OLDNEW
« 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