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

Side by Side Diff: src/objects-inl.h

Issue 363893003: Stack traces exposed to Javascript should omit extensions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5639 matching lines...) Expand 10 before | Expand all | Expand 10 after
5650 code()->set_optimizable(true); 5650 code()->set_optimizable(true);
5651 } 5651 }
5652 } 5652 }
5653 5653
5654 5654
5655 bool JSFunction::IsBuiltin() { 5655 bool JSFunction::IsBuiltin() {
5656 return context()->global_object()->IsJSBuiltinsObject(); 5656 return context()->global_object()->IsJSBuiltinsObject();
5657 } 5657 }
5658 5658
5659 5659
5660 bool JSFunction::IsNative() { 5660 bool JSFunction::IsFromNativeScript() {
5661 Object* script = shared()->script(); 5661 Object* script = shared()->script();
5662 bool native = script->IsScript() && 5662 bool native = script->IsScript() &&
5663 Script::cast(script)->type()->value() == Script::TYPE_NATIVE; 5663 Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
5664 ASSERT(!IsBuiltin() || native); // All builtins are also native. 5664 ASSERT(!IsBuiltin() || native); // All builtins are also native.
5665 return native; 5665 return native;
5666 } 5666 }
5667 5667
5668 5668
5669 bool JSFunction::IsFromExtensionScript() {
5670 Object* script = shared()->script();
5671 return script->IsScript() &&
5672 Script::cast(script)->type()->value() == Script::TYPE_EXTENSION;
5673 }
5674
5675
5669 bool JSFunction::NeedsArgumentsAdaption() { 5676 bool JSFunction::NeedsArgumentsAdaption() {
5670 return shared()->formal_parameter_count() != 5677 return shared()->formal_parameter_count() !=
5671 SharedFunctionInfo::kDontAdaptArgumentsSentinel; 5678 SharedFunctionInfo::kDontAdaptArgumentsSentinel;
5672 } 5679 }
5673 5680
5674 5681
5675 bool JSFunction::IsOptimized() { 5682 bool JSFunction::IsOptimized() {
5676 return code()->kind() == Code::OPTIMIZED_FUNCTION; 5683 return code()->kind() == Code::OPTIMIZED_FUNCTION;
5677 } 5684 }
5678 5685
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
7058 #undef READ_SHORT_FIELD 7065 #undef READ_SHORT_FIELD
7059 #undef WRITE_SHORT_FIELD 7066 #undef WRITE_SHORT_FIELD
7060 #undef READ_BYTE_FIELD 7067 #undef READ_BYTE_FIELD
7061 #undef WRITE_BYTE_FIELD 7068 #undef WRITE_BYTE_FIELD
7062 #undef NOBARRIER_READ_BYTE_FIELD 7069 #undef NOBARRIER_READ_BYTE_FIELD
7063 #undef NOBARRIER_WRITE_BYTE_FIELD 7070 #undef NOBARRIER_WRITE_BYTE_FIELD
7064 7071
7065 } } // namespace v8::internal 7072 } } // namespace v8::internal
7066 7073
7067 #endif // V8_OBJECTS_INL_H_ 7074 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698