OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
9 #include "api.h" | 9 #include "api.h" |
10 #include "arguments.h" | 10 #include "arguments.h" |
(...skipping 10669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10680 // non-optimizable if optimization is disabled for the shared | 10680 // non-optimizable if optimization is disabled for the shared |
10681 // function info. | 10681 // function info. |
10682 set_optimization_disabled(true); | 10682 set_optimization_disabled(true); |
10683 set_bailout_reason(reason); | 10683 set_bailout_reason(reason); |
10684 // Code should be the lazy compilation stub or else unoptimized. If the | 10684 // Code should be the lazy compilation stub or else unoptimized. If the |
10685 // latter, disable optimization for the code too. | 10685 // latter, disable optimization for the code too. |
10686 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); | 10686 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); |
10687 if (code()->kind() == Code::FUNCTION) { | 10687 if (code()->kind() == Code::FUNCTION) { |
10688 code()->set_optimizable(false); | 10688 code()->set_optimizable(false); |
10689 } | 10689 } |
10690 PROFILE(GetIsolate(), | 10690 PROFILE(GetIsolate(), CodeDisableOptEvent(code(), this)); |
10691 LogExistingFunction(Handle<SharedFunctionInfo>(this), | |
10692 Handle<Code>(code()))); | |
10693 if (FLAG_trace_opt) { | 10691 if (FLAG_trace_opt) { |
10694 PrintF("[disabled optimization for "); | 10692 PrintF("[disabled optimization for "); |
10695 ShortPrint(); | 10693 ShortPrint(); |
10696 PrintF(", reason: %s]\n", GetBailoutReason(reason)); | 10694 PrintF(", reason: %s]\n", GetBailoutReason(reason)); |
10697 } | 10695 } |
10698 } | 10696 } |
10699 | 10697 |
10700 | 10698 |
10701 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) { | 10699 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) { |
10702 ASSERT(!id.IsNone()); | 10700 ASSERT(!id.IsNone()); |
(...skipping 6577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17280 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17278 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17281 static const char* error_messages_[] = { | 17279 static const char* error_messages_[] = { |
17282 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17280 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17283 }; | 17281 }; |
17284 #undef ERROR_MESSAGES_TEXTS | 17282 #undef ERROR_MESSAGES_TEXTS |
17285 return error_messages_[reason]; | 17283 return error_messages_[reason]; |
17286 } | 17284 } |
17287 | 17285 |
17288 | 17286 |
17289 } } // namespace v8::internal | 17287 } } // namespace v8::internal |
OLD | NEW |