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

Side by Side Diff: src/ic.cc

Issue 7901016: Basic support for tracking smi-only arrays on ia32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: deactivate by default Created 9 years, 3 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 it.Advance(); 80 it.Advance();
81 raw_frame = it.frame(); 81 raw_frame = it.frame();
82 } 82 }
83 } 83 }
84 if (raw_frame->is_java_script()) { 84 if (raw_frame->is_java_script()) {
85 JavaScriptFrame* frame = JavaScriptFrame::cast(raw_frame); 85 JavaScriptFrame* frame = JavaScriptFrame::cast(raw_frame);
86 Code* js_code = frame->unchecked_code(); 86 Code* js_code = frame->unchecked_code();
87 // Find the function on the stack and both the active code for the 87 // Find the function on the stack and both the active code for the
88 // function and the original code. 88 // function and the original code.
89 JSFunction* function = JSFunction::cast(frame->function()); 89 JSFunction* function = JSFunction::cast(frame->function());
90
91 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString( );
Sven Panne 2011/09/16 09:19:32 Debugging remnants? :-)
92 if (!strcmp(*name, "draw") && !strcmp(type, "KeyedStoreIC")) {
93 // asm("int3");
94 }
95 function->PrintName(); 90 function->PrintName();
96 int code_offset = 91 int code_offset =
97 static_cast<int>(address() - js_code->instruction_start()); 92 static_cast<int>(address() - js_code->instruction_start());
98 PrintF("+%d", code_offset); 93 PrintF("+%d", code_offset);
99 } else { 94 } else {
100 PrintF("<unknown>"); 95 PrintF("<unknown>");
101 } 96 }
102 PrintF(" (%c->%c)%s", 97 PrintF(" (%c->%c)%s",
103 TransitionMarkFromState(old_state), 98 TransitionMarkFromState(old_state),
104 TransitionMarkFromState(new_state), 99 TransitionMarkFromState(new_state),
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 1683
1689 MaybeObject* KeyedIC::ComputeMonomorphicStubWithoutMapCheck( 1684 MaybeObject* KeyedIC::ComputeMonomorphicStubWithoutMapCheck(
1690 Map* receiver_map, 1685 Map* receiver_map,
1691 StrictModeFlag strict_mode) { 1686 StrictModeFlag strict_mode) {
1692 if ((receiver_map->instance_type() & kNotStringTag) == 0) { 1687 if ((receiver_map->instance_type() & kNotStringTag) == 0) {
1693 ASSERT(string_stub() != NULL); 1688 ASSERT(string_stub() != NULL);
1694 return string_stub(); 1689 return string_stub();
1695 } else { 1690 } else {
1696 ASSERT(receiver_map->has_dictionary_elements() || 1691 ASSERT(receiver_map->has_dictionary_elements() ||
1697 receiver_map->has_fast_elements() || 1692 receiver_map->has_fast_elements() ||
1693 receiver_map->has_fast_smi_only_elements() ||
1698 receiver_map->has_fast_double_elements() || 1694 receiver_map->has_fast_double_elements() ||
1699 receiver_map->has_external_array_elements()); 1695 receiver_map->has_external_array_elements());
1700 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 1696 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
1701 return GetElementStubWithoutMapCheck(is_js_array, 1697 return GetElementStubWithoutMapCheck(is_js_array,
1702 receiver_map->elements_kind()); 1698 receiver_map->elements_kind());
1703 } 1699 }
1704 } 1700 }
1705 1701
1706 1702
1707 MaybeObject* KeyedIC::ComputeMonomorphicStub(JSObject* receiver, 1703 MaybeObject* KeyedIC::ComputeMonomorphicStub(JSObject* receiver,
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2537 #undef ADDR 2533 #undef ADDR
2538 }; 2534 };
2539 2535
2540 2536
2541 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2537 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2542 return IC_utilities[id]; 2538 return IC_utilities[id];
2543 } 2539 }
2544 2540
2545 2541
2546 } } // namespace v8::internal 2542 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698