| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 if (!result->IsFailure()) { | 905 if (!result->IsFailure()) { |
| 906 Code* code = Code::cast(result); | 906 Code* code = Code::cast(result); |
| 907 USE(code); | 907 USE(code); |
| 908 LOG(CodeCreateEvent("CallDebugPrepareStepIn", code, | 908 LOG(CodeCreateEvent("CallDebugPrepareStepIn", code, |
| 909 code->arguments_count())); | 909 code->arguments_count())); |
| 910 } | 910 } |
| 911 return result; | 911 return result; |
| 912 } | 912 } |
| 913 | 913 |
| 914 | 914 |
| 915 DECLARE_bool(print_code_stubs); | |
| 916 Object* StubCompiler::GetCodeWithFlags(Code::Flags flags) { | 915 Object* StubCompiler::GetCodeWithFlags(Code::Flags flags) { |
| 917 CodeDesc desc; | 916 CodeDesc desc; |
| 918 masm_.GetCode(&desc); | 917 masm_.GetCode(&desc); |
| 919 Object* result = Heap::CreateCode(desc, NULL, flags); | 918 Object* result = Heap::CreateCode(desc, NULL, flags); |
| 920 #ifdef DEBUG | 919 #ifdef DEBUG |
| 921 if (FLAG_print_code_stubs && !result->IsFailure()) { | 920 if (FLAG_print_code_stubs && !result->IsFailure()) { |
| 922 Code::cast(result)->Print(); | 921 Code::cast(result)->Print(); |
| 923 } | 922 } |
| 924 #endif | 923 #endif |
| 925 return result; | 924 return result; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 949 | 948 |
| 950 | 949 |
| 951 Object* CallStubCompiler::GetCode(PropertyType type) { | 950 Object* CallStubCompiler::GetCode(PropertyType type) { |
| 952 int argc = arguments_.immediate(); | 951 int argc = arguments_.immediate(); |
| 953 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, type, argc); | 952 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, type, argc); |
| 954 return GetCodeWithFlags(flags); | 953 return GetCodeWithFlags(flags); |
| 955 } | 954 } |
| 956 | 955 |
| 957 | 956 |
| 958 } } // namespace v8::internal | 957 } } // namespace v8::internal |
| OLD | NEW |