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

Side by Side Diff: src/isolate.cc

Issue 19504006: More aggressively inline optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/hydrogen.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 bool encountered_strict_function = false; 662 bool encountered_strict_function = false;
663 for (StackFrameIterator iter(this); 663 for (StackFrameIterator iter(this);
664 !iter.done() && frames_seen < limit; 664 !iter.done() && frames_seen < limit;
665 iter.Advance()) { 665 iter.Advance()) {
666 StackFrame* raw_frame = iter.frame(); 666 StackFrame* raw_frame = iter.frame();
667 if (IsVisibleInStackTrace(raw_frame, *caller, &seen_caller)) { 667 if (IsVisibleInStackTrace(raw_frame, *caller, &seen_caller)) {
668 frames_seen++; 668 frames_seen++;
669 JavaScriptFrame* frame = JavaScriptFrame::cast(raw_frame); 669 JavaScriptFrame* frame = JavaScriptFrame::cast(raw_frame);
670 // Set initial size to the maximum inlining level + 1 for the outermost 670 // Set initial size to the maximum inlining level + 1 for the outermost
671 // function. 671 // function.
672 List<FrameSummary> frames(Compiler::kMaxInliningLevels + 1); 672 List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
673 frame->Summarize(&frames); 673 frame->Summarize(&frames);
674 for (int i = frames.length() - 1; i >= 0; i--) { 674 for (int i = frames.length() - 1; i >= 0; i--) {
675 if (cursor + 4 > elements->length()) { 675 if (cursor + 4 > elements->length()) {
676 int new_capacity = JSObject::NewElementsCapacity(elements->length()); 676 int new_capacity = JSObject::NewElementsCapacity(elements->length());
677 Handle<FixedArray> new_elements = 677 Handle<FixedArray> new_elements =
678 factory()->NewFixedArrayWithHoles(new_capacity); 678 factory()->NewFixedArrayWithHoles(new_capacity);
679 for (int i = 0; i < cursor; i++) { 679 for (int i = 0; i < cursor; i++) {
680 new_elements->set(i, elements->get(i)); 680 new_elements->set(i, elements->get(i));
681 } 681 }
682 elements = new_elements; 682 elements = new_elements;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("isEval")); 745 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("isEval"));
746 Handle<String> constructor_key = 746 Handle<String> constructor_key =
747 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("isConstructor")); 747 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("isConstructor"));
748 748
749 StackTraceFrameIterator it(this); 749 StackTraceFrameIterator it(this);
750 int frames_seen = 0; 750 int frames_seen = 0;
751 while (!it.done() && (frames_seen < limit)) { 751 while (!it.done() && (frames_seen < limit)) {
752 JavaScriptFrame* frame = it.frame(); 752 JavaScriptFrame* frame = it.frame();
753 // Set initial size to the maximum inlining level + 1 for the outermost 753 // Set initial size to the maximum inlining level + 1 for the outermost
754 // function. 754 // function.
755 List<FrameSummary> frames(Compiler::kMaxInliningLevels + 1); 755 List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
756 frame->Summarize(&frames); 756 frame->Summarize(&frames);
757 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) { 757 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) {
758 // Create a JSObject to hold the information for the StackFrame. 758 // Create a JSObject to hold the information for the StackFrame.
759 Handle<JSObject> stack_frame = factory()->NewJSObject(object_function()); 759 Handle<JSObject> stack_frame = factory()->NewJSObject(object_function());
760 760
761 Handle<JSFunction> fun = frames[i].function(); 761 Handle<JSFunction> fun = frames[i].function();
762 Handle<Script> script(Script::cast(fun->shared()->script())); 762 Handle<Script> script(Script::cast(fun->shared()->script()));
763 763
764 if (options & StackTrace::kLineNumber) { 764 if (options & StackTrace::kLineNumber) {
765 int script_line_offset = script->line_offset()->value(); 765 int script_line_offset = script->line_offset()->value();
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 2505
2506 #ifdef DEBUG 2506 #ifdef DEBUG
2507 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2507 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2508 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2508 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2509 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2509 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2510 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2510 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2511 #undef ISOLATE_FIELD_OFFSET 2511 #undef ISOLATE_FIELD_OFFSET
2512 #endif 2512 #endif
2513 2513
2514 } } // namespace v8::internal 2514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698