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 "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 // No other combinations are possible. | 975 // No other combinations are possible. |
976 UNREACHABLE(); | 976 UNREACHABLE(); |
977 } | 977 } |
978 } | 978 } |
979 | 979 |
980 | 980 |
981 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 981 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
982 | 982 |
983 #undef __ | 983 #undef __ |
984 | 984 |
985 #ifdef DEBUG | |
986 | |
987 // Checks whether the code between start_pc and end_pc is a no-op. | |
988 bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc, | |
989 int end_pc) { | |
990 if (start_pc + 1 != end_pc) { | |
991 return false; | |
992 } | |
993 return *(code->instruction_start() + start_pc) == | |
994 v8::internal::Assembler::kNopByte; | |
995 } | |
996 | |
997 #endif | |
998 | |
999 } // namespace internal | 985 } // namespace internal |
1000 } // namespace compiler | 986 } // namespace compiler |
1001 } // namespace v8 | 987 } // namespace v8 |
OLD | NEW |