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

Side by Side Diff: src/macros.py

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 4 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
OLDNEW
1 # Copyright 2006-2009 the V8 project authors. All rights reserved. 1 # Copyright 2006-2009 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 # Type query macros. 84 # Type query macros.
85 # 85 #
86 # Note: We have special support for typeof(foo) === 'bar' in the compiler. 86 # Note: We have special support for typeof(foo) === 'bar' in the compiler.
87 # It will *not* generate a runtime typeof call for the most important 87 # It will *not* generate a runtime typeof call for the most important
88 # values of 'bar'. 88 # values of 'bar'.
89 macro IS_NULL(arg) = (arg === null); 89 macro IS_NULL(arg) = (arg === null);
90 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); 90 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
91 macro IS_UNDEFINED(arg) = (arg === (void 0)); 91 macro IS_UNDEFINED(arg) = (arg === (void 0));
92 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); 92 macro IS_NUMBER(arg) = (typeof(arg) === 'number');
93 macro IS_FLOAT32X4(arg) = (typeof(arg) === 'float32x4');
94 macro IS_STRING(arg) = (typeof(arg) === 'string'); 93 macro IS_STRING(arg) = (typeof(arg) === 'string');
95 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); 94 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
96 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); 95 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
97 macro IS_OBJECT(arg) = (%_IsObject(arg)); 96 macro IS_OBJECT(arg) = (%_IsObject(arg));
98 macro IS_ARRAY(arg) = (%_IsArray(arg)); 97 macro IS_ARRAY(arg) = (%_IsArray(arg));
99 macro IS_DATE(arg) = (%_IsDate(arg)); 98 macro IS_DATE(arg) = (%_IsDate(arg));
100 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); 99 macro IS_FUNCTION(arg) = (%_IsFunction(arg));
101 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); 100 macro IS_REGEXP(arg) = (%_IsRegExp(arg));
101 macro IS_SIMD_VALUE(arg) = (%_IsSimdValue(arg));
rossberg 2015/07/30 15:12:24 I'm surprised this actually works! See above, you
adamk 2015/07/30 15:34:58 Drive-by explanation of why this works: since a re
bbudge 2015/07/30 23:27:01 Added the intrinsic, at least for fullcodegen. I t
102 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); 102 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
103 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); 103 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
104 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); 104 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
105 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); 105 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
106 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); 106 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number');
107 macro IS_FLOAT32X4_WRAPPER(arg) = (%_ClassOf(arg) === 'Float32x4');
108 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); 107 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
109 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol'); 108 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
110 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); 109 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
111 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); 110 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
112 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); 111 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
113 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); 112 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments');
114 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); 113 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
115 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); 114 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
116 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); 115 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
117 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer'); 116 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 define NOT_FOUND = -1; 305 define NOT_FOUND = -1;
307 306
308 # Check whether debug is active. 307 # Check whether debug is active.
309 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 308 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
310 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function)); 309 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function));
311 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function); 310 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function);
312 311
313 # SharedFlag equivalents 312 # SharedFlag equivalents
314 define kNotShared = false; 313 define kNotShared = false;
315 define kShared = true; 314 define kShared = true;
OLDNEW
« no previous file with comments | « src/ic/ic-inl.h ('k') | src/messages.h » ('j') | src/runtime/runtime-simd.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698